// ignore_for_file: library_private_types_in_public_api
import 'package:aitao_flutter/style/color_style.dart';
import 'package:flutter/material.dart';

class TestPage extends StatefulWidget {
  const TestPage({Key? key}) : super(key: key);

  @override
  State<TestPage> createState() => _TestPageState();
}

class _TestPageState extends State<TestPage>
    with SingleTickerProviderStateMixin {
  double marginLeft = 0.0;
  double cW = 100;
  double cH = 100;
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          setState(() {
            // marginLeft += 20;
            cW += 10;
            cH += 10;
          });
        },
        child: const Icon(Icons.add),
      ),
      appBar: AppBar(
        title: const Text('Test Page'),
      ),
      body: Center(
          child: AnimatedContainer(
        duration: const Duration(seconds: 2),
        child: Container(
          margin: EdgeInsets.only(left: marginLeft),
          width: cW,
          height: cH,
          color: ColorStyle.orangeColor,
        ),
      )),
    ));
  }
}
